package com.len.controller;

import com.len.base.BaseController;
import com.len.entity.SpBanner;
import com.len.service.SpBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("spBanner")
public class SpBannerController extends BaseController<SpBanner> {
    @Autowired
    private SpBannerService spBannerService;
    @RequestMapping("/show")
    public String show(SpBanner spBanner){
        try {
            spBannerService.selectByPrimaryKey(spBanner);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
    @RequestMapping("/save")
    public String save(SpBanner spBanner){
        try {
            spBannerService.insert(spBanner);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
    @RequestMapping("/update")
    public String update(SpBanner spBanner){
        try {
            spBannerService.updateByPrimaryKey(spBanner);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
